﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.EmphasizeContinuousMfg.CApECMContinuousMfgItem
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands.EmphasizeContinuousMfg;

internal class CApECMContinuousMfgItem
{
  private const int CONTINUOUS_MFG_INITIAL_WIDTH = 1;
  private TxSeamMfgFeature m_mfg;
  private int m_originalWidth;
  private int m_currentWidth;
  private TxColor m_currentEmphasizingColor;
  private bool m_isEmphasizedColor;

  public TxSeamMfgFeature Mfg => this.m_mfg;

  public int OriginalWidth => this.m_originalWidth;

  public int CurrentWidth
  {
    get => this.m_currentWidth;
    set => this.m_currentWidth = value;
  }

  public TxColor CurrentColor
  {
    get => this.IsEmphasizedColor ? this.m_currentEmphasizingColor : (TxColor) null;
    set
    {
      this.m_currentEmphasizingColor = value;
      this.IsEmphasizedColor = true;
    }
  }

  public bool IsEmphasizedColor
  {
    get => this.m_isEmphasizedColor;
    set => this.m_isEmphasizedColor = value;
  }

  public CApECMContinuousMfgItem(TxSeamMfgFeature mfg, int originalWidth)
  {
    this.m_mfg = mfg;
    this.m_currentWidth = this.m_originalWidth = originalWidth;
    this.m_isEmphasizedColor = false;
    this.m_currentEmphasizingColor = new TxColor();
  }

  public CApECMContinuousMfgItem(TxSeamMfgFeature mfg)
  {
    this.m_mfg = mfg;
    if (!TxSeamMfgFeature.op_Inequality(mfg, (ITxObject) null))
      return;
    this.m_isEmphasizedColor = false;
    this.m_currentEmphasizingColor = new TxColor();
    this.m_currentWidth = this.m_originalWidth = 1;
  }
}
